<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // console.log(Math.ceil(Math.random()*(5+1)));
      // console.log(Math.floor(Math.random()*(10+1)));
      // console.log(Math.max(12, 3, 12, 4));
      // console.log(Math.min(1, 23, 4, 0, -1));
      // // alert((Math.random()) );
      // // alert(Math.pow());
      // // alert(Math.abs(12.12));
      // // 重要 必背
      // Math.floor(Math.random()*(m-n+1))+n



      // let arr = ['郭保坤','李达康','林耀东','沙瑞金','曹雪芹']
      // let p = Math.floor(Math.random()*arr.length)
      // let name = arr[p]
      // alert(name)



      let arr = ['郭保坤','李达康','林耀东','沙瑞金','曹雪芹']
      let i = Math.floor(Math.random()*arr.length)
      
      alert(arr[i])
      // 在数组中 把刚才抽到的数据删除
      arr.splice(i,1)
      alert(arr)
    </script>
  </body>
</html>
